package com.gm.commonlib.util;

public class PromptInfoUtils {

	public static String getDefaultErrorPrompt(int httpStatus) {
		String ret = "";
		switch (httpStatus) {
		case 200:
			ret = "操作成功";
			break;
		case 204:
			ret = "暂无内容";
			break;
		case 302:
			ret = "数据没有修改";
			break;
		case 400:
			ret = "参数错误";
			break;
		case 401: case 403:
			ret = "登录失效,请重新登录";
			break;
		case 402:
			ret = "无Quota";
			break;
		case 404:
			ret = "请求的服务或页面不存在或已经下线";
			break;
		case 405:
			ret = "不允许的操作（指定了错误的 HTTP方法或 API）";
			break;
		case 406:
			ret = "请求被丢弃";
			break;
		case 408:
			ret = "已过期";
			break;
		case 409:
			ret = "重复操作";
			break;
		case 412:
			ret = "Header错误";
			break;
		case 500:
			ret = "服务器内部错误";
			break;
		case 501:
			ret = "解析json失败";
			break;
		case 9:
		case 1009:
			ret = "当前网络不可用，请检查网络设置";
			break;
		default:
			ret = "服务器未知异常或网络异常";
			break;
		}
		ret += "["+httpStatus+"].";
		return ret;
	}
}
